<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>websocket在线测试</title>
    <link rel="stylesheet" href="CSS/min/index.css" />
    <link rel="stylesheet" href="CSS/min/bootstrap.min.css" />
    <meta charset="utf-8" />
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?026b3828b6b2d9f98dc9e928d90d2c37";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>

<body>
    <div>
        <div class="zone_conn">
            <input type="text" class="form-control" style="float: left;" id="inp_url" value=""
                placeholder="连接的地址" />
            <button type="button" id="btn_conn" class="btn btn-primary"
                style="float: left; margin-left: 10px; margin-right: 10px;" onclick="fun_initWebSocket();">
                连接
            </button>
            <button type="button" id="btn_close" class="btn btn-danger" style="float: left;" disabled="disabled"
                onclick="fun_close();">
                断开
            </button>
        </div>
        <div class="clearboth" style="width: 430px;">
            1、连接格式为 ws://IP或域名:端口（示例ws://121.40.165.18:8800 或者 ws://echo.websocket.org）<br />
            2、对于<span style="color: red;">内网</span>的测试环境，只需填入服务端的<span style="color: red;">内网IP</span>和端口<br />
            3、可连接我上面提供的服务端ws地址来测试您<span style="color: red;">自己的客户端</span>
        </div>
        <div class="zone_send">
            <a id="emoji" style="position: relative; left: 374px; bottom: 5px; cursor: pointer;" data-toggle="popover"
                title="表情"><img style="outline-width: 40px;"
                    src="http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/5c/huanglianwx_thumb.gif" />表情</a>
            <textarea id="inp_send" class="form-control" style="height: 100px;" placeholder="发送的内容"></textarea>
            <br />
            <button type="button" id="btn_send" class="btn btn-info" onclick="fun_sendto();">
                发送（ctrl+回车）
            </button>
            <div style="margin-top: 10px; color: red; line-height: 30px;">
                1、平台兼容IE6及以上的任何浏览器接入
            </div>
            <div data-toggle="modal" data-target="#myModal" style="
            color: blue;
            line-height: 30px;
            font-size: 16px;
            cursor: pointer;
            text-decoration: underline;
          "></div>
        </div>
    </div>
    <div style="position: absolute; top: 10px; left: 470px;">
        <div id="div_msgzone" class="panel panel-default">
            <div class="panel-heading">消息窗口</div>
            <div id="div_msg" class="panel-body"></div>
        </div>
    </div>
    <script type="text/javascript" src="JS/min/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="JS/min/bootstrap.min.js"></script>
    <script type="text/javascript" src="JS/min/index.js?v=123"></script>
</body>

</html>